package com.cyyz.dao;

import com.cyyz.entity.Tag;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName TagDao
 * @Description TODO
 * @Author 简笔轩客
 * @Date 2020/5/30 11:18
 * @Version 1.0
 */
@Mapper
@Repository
public interface TagDao {

    int saveTag(Tag tag);

    Tag getTag(Long id);

    List<Tag> getAllTag();

    List<Tag> getAllTagAndBlog();

    List<Tag> getTagByString(List<Long> ids);

    List<Tag> getTagByBlogId(Long id);

    Tag getTagByName(String tag);

    int updateTag(Tag tag);

    void deleteTag(Long id);

}
